package com.example.gzysmartcity.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.gzysmartcity.R;
import com.example.gzysmartcity.repository.model.HospData;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class HospRvAdapter extends BaseQuickAdapter<HospData, BaseViewHolder> {
    List<HospData> mHospData;
    public HospRvAdapter(int layoutResId,List<HospData> h) {
        super(layoutResId);
        this.mHospData=h;
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, HospData hospData) {
        baseViewHolder.setText(R.id.tv_rv_hosp_index,(baseViewHolder.getAdapterPosition()+1)+"");
        baseViewHolder.setText(R.id.tv_rv_yyuan, hospData.getHospName());
        baseViewHolder.setText(R.id.tv_rv_keshi, hospData.getKeShiName());
        baseViewHolder.setText(R.id.tv_rv_mengzhen, hospData.getMenZhenName());
    }
}
